package com.gupaoedu.springboot.springbootstarterdemo.jmxDemo;

/**
 * <p>
 *
 * </p>
 *
 * @author Nicky
 * @since 2019-07-13
 */
public class Mechine implements MechineMBean {
    @Override
    public int getCpuCore() {
        return Runtime.getRuntime().availableProcessors();
    }

    @Override
    public long getFreeMemory() {
        return Runtime.getRuntime().freeMemory();
    }

    @Override
    public void shutdown() {
        System.exit(0);
    }
}
